package com.example.turnoverwarning.service;

import com.example.turnoverwarning.dto.PageResult;
import com.example.turnoverwarning.entity.Shop;
import com.example.turnoverwarning.vo.ShopDetailVO;
import com.example.turnoverwarning.vo.ShopVO;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
 * @author Survive
 * @date 2025/3/11
 * @description TODO
 */

public interface ShopService {

    void addShopAlert(Long id, String mail, BigDecimal threshold);

    /**
     * 更新店铺预警信息
     * @param shopId
     * @param mail
     * @param threshold
     * @return
     */
    Shop updateShopAlert(Long shopId, String mail, BigDecimal threshold);

    /**
     * 清空预警信息
     * @param shopId
     * @return
     */
    Shop clearAlertConfig(Long shopId);

    /**
     * 分页查询
     * @param page
     * @param size
     * @param name
     * @return
     */
    PageResult<ShopVO> listShops(Integer page, Integer size, String name);

    /**
     * 详情
     * @param shopId
     * @param withOrders
     */
    ShopDetailVO getShopDetail(Long shopId, Boolean withOrders);
}